﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace STF.OrangeDog.Model
{
    public class UsersInfo:BaseModel
    {
       
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "用户名")]
        public string RealName { get; set; }
        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "时间")]
        public DateTime Birthday { get; set; }
        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "性别")]
        // 0.女 1.男 2.保密
        public int Gender { get; set; }
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "微信号")]
        public string WeChat { get; set; }
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "电话号")]
        public string Tel { get; set; }
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "家庭住址")]
        public string Address { get; set; }
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "头像")]
        public string Photo { get; set; }
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "余额")]
        public decimal Amount { get; set; }
        [ForeignKey(nameof(Users.Id))]
        public int uid { get; set; }

    }
}
